﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObject;
using System.Security.Cryptography;
using System.Text;

namespace GreenLife.Admin
{
    public partial class ThemTaiKhoan : System.Web.UI.Page
    {
        UserBO usBO = new UserBO();
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void btnAdd_Click(object sender, EventArgs e)
        {
                if (usBO.createUser(txtUser.Text, txtPass.Text, Int32.Parse(txtStatus.Text)))
                {
                    Response.Redirect("DanhSachTaiKhoan.aspx");
                }
                else
                {
                    Response.Redirect("DuplicateAccountError.aspx");
                }
        }
    }
}